namespace CSharpPro._1027;

public class Demo_4
{
    public abstract class UserTest
    {
        public abstract void M1();
        public abstract void M2();
        public abstract void M3();
    }

    public class UserTestImpl : UserTest
    {
        public override void M1()
        {
            Console.WriteLine("子类实现的M1方法");
        }

        public override void M2()
        {
            Console.WriteLine("子类实现的M2方法");
        }

        public override void M3()
        {
            Console.WriteLine("子类实现的M3方法");
        }
    }

// 只保留一个包含Main方法的类作为入口点
    class Program
    {
        static void Main()
        {
            UserTest test = new UserTestImpl();
            test.M1();
            test.M2();
            test.M3();
        }
    }
}